package com.cuijq.ms.template.v4;


import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;

/**
 * @author by CuiJQ
 * @Classname UserRowMapper
 * @Description UserRowMapper Description
 * @Date 2021/5/28 20:38
 */

public class UserRowMapper implements RowMapper {

  @Override
  public User mapRow(ResultSet rs, int rowNum) throws SQLException {
    User user = new User();
    user.setId(rs.getLong("id"));
    user.setName(rs.getString("name"));
    user.setTelephone(rs.getString("telephone"));
    return user;
  }
}

